﻿/*
 * wbo2.c
 *
 * Created: 09.11.2013 2:12:45
 *  Author: Артём
 */ 

#include "config.h"
#include "wbo2.h"
#include <avr/pgmspace.h>
#include "pid/pid.h"

const U8 Narrow_Curve[256] PROGMEM= //256 values. How to get: OCR2=pgm_read_byte(&fiveVout[pump]);
{
	0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,
	0x0B,0x0B,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x09,0x09,0x09,0x08,0x08,0x08,0x07,0x07,
	0x05,0x05,0x04,0x04,0x04,0x03,0x03,0x03,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,
	0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01
};

void WBO2_HeaterInit(void)
{
	pid_Init(K_P_HTR1 * SCALING_FACTOR, K_I_HTR1 * SCALING_FACTOR , K_D_HTR1 * SCALING_FACTOR , &Heater_PidData_1);
	pid_Init(K_P_HTR2 * SCALING_FACTOR, K_I_HTR2 * SCALING_FACTOR , K_D_HTR2 * SCALING_FACTOR , &Heater_PidData_2);
}